#include<iostream>
#include<algorithm>
using namespace std;
int n, r, q;
const int N = 2e5 + 10;
struct node
{
    int s, w, i;
}a[N];

node x[N], y[N];
// 现在应该就没有这样的问题了

void merge()
{
    int cur1 = 1, cur2 = 1, i = 1;
    while (cur1 <= n && cur2 <= n)
    {
        if (x[cur1].s > y[cur2].s || (x[cur1].s == y[cur2].s 
            && x[cur1].i < y[cur2].i))
        {
            a[i++] = x[cur1++];
        }
        else a[i++] = y[cur2++];
    }
    while (cur1 <= n) a[i++] = x[cur1++];
    while (cur2 <= n) a[i++] = y[cur2++];
}
int main()
{
    // zdl:: 这道题目本质上那个就是在排序上的时间复杂度上面做手脚
    cin >> n >> r >> q;
    for (int i = 1 ;i <= 2 * n; i++) cin >> a[i].s;
    for (int i = 1; i <= 2 * n; i++) cin >> a[i].w, a[i].i = i;
    sort(a + 1, a + 1 + 2 * n, [](node& x, node& y){
        if (x.s == y.s) return x.i < y.i;
        return x.s > y.s;
    });

    // zdl:: 接下来就是进行r场比赛，
    while (r--)
    {
        int pos = 1;
        for (int i = 1; i <= 2 * n; i += 2)
        {
            if (a[i].w > a[i + 1].w)
            {
                a[i].s++;
                x[pos] = a[i];
                y[pos] = a[i + 1];
            }
            else{
                a[i + 1].s++;
                x[pos] = a[i + 1];
                y[pos] = a[i];
            }
            pos++;
        }

        // zdl:: 接下来就是归并排序的拟逻辑
        merge();
    }

    cout << a[q].i << endl;
    return 0;
}